<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
	html {
		height: 2000px;
		border: 10px solid black;
	}
	</style>
</head>
<body>
	<script>
		// 当前窗口的尺寸
		var htmlWidth = document.documentElement.clientWidth;
		var htmlHeight = document.documentElement.clientHeight;
		document.write('当前窗口的宽度:'+htmlWidth,'当前窗口的高度:'+htmlHeight)
	</script>
</body>
</html>